{% extends 'WebQuant/base.html' %}
{% block title %}新建云交易{% endblock %}
{% block content %}
	<div class="wrap">
		<div class="main">
			<div class="creatpanel">
				<div style="overflow: hidden">
					<div class="d1"><span>名称：</span><input type="text" class="nick" name="nick"></div>
				</div>
				<div class="errtip errtip1"></div>
				<div style="overflow: hidden">
					<div class="d1"><span>策略：</span><div class="clnick"></div><div class="choose">选择</div></div>
				</div>
				<div class="errtip errtip2"></div>
				<div class="d1"><span>初始资金：</span><input type="text" class="initsum" name="initsum" value="100000"></div>
				<div class="errtip errtip3"></div>
				 <div><a href="/deal" class="back_btn">返回</a>
				<a href="javascript:void(0);" class="run_btn" onclick="on_run_deal()">运行模拟交易</a></div>
				<div class="errtip errtip4"></div>
			</div>
		</div>
	</div><!-- 内容 -->
	<div class="mask"></div>
	
	<div class="pannel2">
		<div class="list">
			<div class="listborder">
				<div class="listhead"><span class="col1">策略名称</span><span class="col2">回测次数</span><span class="col3">修改时间</span></div>
				{% for strategy in strategy_list %}
				<div class="listcont">
					<div class="lchead" strategy_id={{strategy.strategy_id}}>
						<span class="col1">{{strategy.strategy_name}}</span>
						<span class="col2">{{strategy.num}}</span>
						<span class="col3">{{strategy.modify_date}}</span>
						<span class="col5">{{strategy.modify_time}}</span>
						<i class="triangle_down "></i>
					</div>
					{% if strategy.child_list %}
					<div class="listborder_bottom">
						<div class="lcinfo">
							<div class="list_cnt_dead" ><span class="col1 colin">回测序号</span><span class="col2">收益率</span><span class="col3">回测时间</span></div>
							<ul class="query" >
								{% for strategy_child in strategy.child_list %}
								<li deal="true" version_id={{strategy_child.index}}>
									<span class="col1 colin">{{strategy_child.index}}</span>
									<span class="col2">{{strategy_child.total_return}}</span>
									<span class="col4">{{strategy_child.back_test_date}}</span>
									<span class="col5">{{strategy_child.back_test_time}}</span>
									<div class="select_btn">
										<input type="radio" id="" name="select " value=""><label name="" for=""></label>
									</div>
							    </li>
								{% endfor %}
							</ul>
						</div>
					</div>
					{% endif %}
				</div>
				{% endfor %}

			</div>
		</div>
		<input type="button" value="取消" class="no">
		<input type="button" value="确定" class="yes" onclick="select_strategy()">
	</div>
	<!-- <script src="http://apps.bdimg.com/libs/jquery/1.9.1/jquery.min.js"></script> -->
	<script src="http://apps.bdimg.com/libs/jquery/1.9.1/jquery.min.js"></script>
	<script src="/static/WebQuant/js/deal_new.js"></script>

	<script>
		var isLog = {{log}}
		if (isLog)
		{
			$(".l_case2").css("display","block");
			$(".l_case1").css("display","none");
		}
		else
		{
			$(".l_case2").css("display","none");
			$(".l_case1").css("display","block");
		}
	</script>
{% endblock %}
